<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/WEB-INF/page/include.inc.jsp"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>XXX</title>

<script>
	function logout() {
		msgConfirm("信息提示","是否确认退出系统？", function(flag){
			if(flag) {
				document.location.href="logout";
			}
		});
	}
	
	function succesMsg(){
		$.messager.alert("提示","操作成功","info",function(){
			closeCurrTab();
			var aa = $('#mm').data("currtab");
			var currTab = $('#tabs').tabs('getSelected');
			console.log(aa);
			console.log(currTab);
			refreshTab(aa);
		});
	}
	
	function errorMsg(){
		$.messager.alert('提示',"操作失败","info");
	}
</script>
</head>

<body onload="clock()" class="easyui-layout">
	<div region="north" split="true" style="height: 45px; background: #E0ECFF;">
		<span>xxx</span>
		<span style="float: right; padding-top: 10px; padding-right: 20px;">
			登录用户：${user.id}
			<span>|</span>
			<a href="javascript:void(0)" onclick="addTab('修改密码','goUpdatePwd', '');">修改密码</a>
			<span>|</span>
			<a href="javascript:void(0)" onclick="logout();">安全退出</a>
		</span>
	</div>
	
	<div region="west" split="true" title="导航菜单" style="width:180px;">
		<div class="easyui-accordion" border="false" style="overflow:auto;">
			<c:forEach items="${menuMap.childMenu}" var="level1Menu">
				<div title="${level1Menu.name}" style="padding:10px;">
					<ul>
						<c:if test="${fn:length(level1Menu.childMenu)>0}">
							<c:forEach items="${level1Menu.childMenu}" var="level2Menu">
								<li>
									<div>
										<a href="javascript:void(0)"
											onclick="addTab('${level2Menu.name}','<%=request.getContextPath()%>${level2Menu.url}', '');return false;">${level2Menu.name}</a>
									</div>
								</li>
							</c:forEach>
						</c:if>
					</ul>
				</div>
			</c:forEach>
			<div title="系统管理" style="padding:10px;">
				<ul>
					<li>
						<div>
							<a href="javascript:void(0)"
								onclick="addTab('操作员管理','<%=request.getContextPath()%>/system/operator/list', '');return false;">操作员管理</a>
						</div>
					</li>
					<li>
						<div>
							<a href="javascript:void(0)"
								onclick="addTab('角色管理','<%=request.getContextPath()%>/system/role/list', '');return false;">角色管理</a>
						</div>
					</li>
					<li>
						<div>
							<a href="javascript:void(0)"
								onclick="addTab('权限管理','<%=request.getContextPath()%>/system/privilege/list', '');return false;">权限管理</a>
						</div>
					</li>
				</ul>
			</div>
			<div title="系统管理" style="padding:10px;">
				<ul>
					<li>
						<div>
							<a href="javascript:void(0)"
								onclick="addTab('操作员管理','<%=request.getContextPath()%>/system/operator/list', '');return false;">操作员管理</a>
						</div>
					</li>
					<li>
						<div>
							<a href="javascript:void(0)"
								onclick="addTab('角色管理','<%=request.getContextPath()%>/system/role/list', '');return false;">角色管理</a>
						</div>
					</li>
				</ul>
			</div>
		</div>
	</div>
	
	<div region="south" split="true" style="height: 32px; background: #E0ECFF;">
		<div class="footer">
			x xx
		</div>
	</div>

	<div id="mainPanle" data-options="region:'center'">
		<div id="tabs" class="easyui-tabs" data-options="fit:true,border:false,plain:true">
			<div title="我的主页">
                <div id="bgclock"></div>
            </div>
		</div>
	</div>
	
	<div id="mm" class="easyui-menu" style="width: 150px;" >
		<div id="mm-tabupdate">
			刷新
		</div>
		<div class="menu-sep"></div>
		<div id="mm-tabclose">
			关闭标签页
		</div>
		<div id="mm-tabcloseother">
			关闭其它标签页
		</div>
		<div id="mm-tabcloseall">
			关闭所有标签页
		</div>
		<div class="menu-sep"></div>
		<div id="mm-tabcloseleft">
			关闭左侧标签页
		</div>
		<div id="mm-tabcloseright">
			关闭右侧标签页
		</div>
	</div>
	
	<!-- <iframe name="hideIframe" style="display:none"></iframe> -->
</body>
</html>
